import { KlineTrend } from "../entitys/KlineTrend";
import { AppDataSource } from "../type-orm";

const klineTrendRepository = AppDataSource.getRepository(KlineTrend);


export const saveKlineTrend = async (klineTrend: KlineTrend) => {
  return await klineTrendRepository.save(klineTrend);
};


export const getKlineTrendsByCode = async (code: string) => {
  return await klineTrendRepository.find({ where: { code }});
};